// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

// 预编译指令，确保头文件只被包含一次，防止重复定义

#include "UObject/Interface.h"

// 包含UE的接口基类

#include "LyraAbilitySourceInterface.generated.h"

// 包含UE生成的反射代码头文件

class UObject;
class UPhysicalMaterial;
struct FGameplayTagContainer;

// 前向声明，避免包含整个头文件，减少编译依赖

/** Base interface for anything acting as a ability calculation source */
// 注释：作为技能计算源的基接口
UINTERFACE()
// UE宏，声明反射接口类
class ULyraAbilitySourceInterface : public UInterface
// 反射接口类，继承自UInterface
{
	GENERATED_UINTERFACE_BODY()
	// UE宏，生成反射接口类的标准代码
};

class ILyraAbilitySourceInterface
// 实际的C++接口类
{
	GENERATED_IINTERFACE_BODY()
	// UE宏，生成接口类的标准代码

	/**
	 * Compute the multiplier for effect falloff with distance
	 * 
	 * @param Distance          Distance from source to target for ability calculations (distance bullet traveled for a gun, etc...)
	 * @param SourceTags        Aggregated Tags from the source
	 * @param TargetTags        Aggregated Tags currently on the target
	 * 
	 * @return Multiplier to apply to the base attribute value due to distance
	 */
	// 注释：计算基于距离的效果衰减乘数
	virtual float GetDistanceAttenuation(float Distance, const FGameplayTagContainer* SourceTags = nullptr, const FGameplayTagContainer* TargetTags = nullptr) const = 0;
	// 纯虚函数：获取距离衰减系数，考虑源标签和目标标签

	virtual float GetPhysicalMaterialAttenuation(const UPhysicalMaterial* PhysicalMaterial, const FGameplayTagContainer* SourceTags = nullptr, const FGameplayTagContainer* TargetTags = nullptr) const = 0;
	// 纯虚函数：获取物理材质衰减系数，考虑物理材质和标签
};